import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
import Login from '@/views/login/Login'
import ResetPassword from '@/views/login/ResetPassword'
import ResetPasswordAfterLogin from '@/views/login/ResetPasswordAfterLogin'
import Register from '@/views/login/Register'
import Frame from '@/views/frame/frame'
import Dashboard from '@/views/dashboard/Dashboard'
import Datasetlist from '@/views/dataset/DatasetList'
import DatasetGrantlist from '@/views/dataset/DatasetGrantList'
import DatasetPubliclist from '@/views/dataset/DatasetPublicList'
import DatasetDetail from '@/views/dataset/DatasetDetail'
import DatasetMember from '@/views/dataset/DatasetMember'
import DatasetCreate from '@/views/dataset/DatasetCreate'
import TrainjobList from '@/views/trainjob/TrainjobList'
import TrainjobCreate from '@/views/trainjob/TrainjobCreate'
import TrainjobDetail from '@/views/trainjob/TrainjobDetail'
import ModelList from '@/views/model/ModelList'
import ModelMember from '@/views/model/ModelMember'
import ModelCreate from '@/views/model/ModelCreate'
import ModelPublicList from '@/views/model/ModelPublicList'
import ModelGrantList from '@/views/model/ModelGrantList'
import ModelDetail from '@/views/model/ModelDetail'
import ModelVersionDetail from '@/views/model/ModelVersionDetail'
import ApplicationList from '@/views/application/ApplicationList'
import ApplicationCreate from '@/views/application/ApplicationCreate'
import ApplicationDetail from '@/views/application/ApplicationDetail'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'main',
      redirect: '/dashboard',
      component: Frame,
      children: [
        {
          path: 'dashboard',
          name: 'dashboard',
          component: Dashboard
        },
        {
          path: '/dataset/list/mine',
          name: 'datasetlist-mine',
          component: Datasetlist
        },
        {
          path: '/dataset/list/public',
          name: 'datasetlist-public',
          component: DatasetPubliclist
        },
        {
          path: '/dataset/list/grant',
          name: 'datasetlist-grant',
          component: DatasetGrantlist
        },
        {
          path: '/dataset/detail',
          name: 'dataset-detail',
          component: DatasetDetail
        },
        {
          path: '/dataset/member',
          name: 'dataset-member',
          component: DatasetMember
        },
        {
          path: '/dataset/create',
          name: 'dataset-create',
          component: DatasetCreate
        },
        {
          path: '/trainjob/list/mine',
          name: 'trainjoblist-mine',
          component: TrainjobList
        },
        {
          path: '/trainjob/create',
          name: 'trainjob-create',
          component: TrainjobCreate
        },
        {
          path: '/trainjob/detail',
          name: 'trainjob-detail',
          component: TrainjobDetail
        },
        {
          path: '/model/list/mine',
          name: 'modellist-mine',
          component: ModelList
        },
        {
          path: '/model/list/public',
          name: 'modellist-public',
          component: ModelPublicList
        },
        {
          path: '/model/list/grant',
          name: 'modellist-grant',
          component: ModelGrantList
        },
        {
          path: '/model/member',
          name: 'model-member',
          component: ModelMember
        },
        {
          path: '/model/create',
          name: 'model-create',
          component: ModelCreate
        },
        {
          path: '/model/detail',
          name: 'model-detail',
          component: ModelDetail
        },
        {
          path: '/model/version/detail',
          name: 'model-version-detail',
          component: ModelVersionDetail
        },
        {
          path: '/app/list/mine',
          name: 'applist-mine',
          component: ApplicationList
        },
        {
          path: '/app/create',
          name: 'app-create',
          component: ApplicationCreate
        },
        {
          path: '/app/detail',
          name: 'app-detail',
          component: ApplicationDetail
        },
        {
          path: '/password/reset',
          name: 'reset-password-auth',
          component: ResetPasswordAfterLogin
        }
      ]
    },
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    {
      path: '/login/password/reset',
      name: 'reset-password',
      component: ResetPassword
    },
    {
      path: '/register',
      name: 'register',
      component: Register
    }
  ]
})
